import React from 'react';
import {CalendarSection} from './Accounts/CalendarSection';
import {RecordsSection} from './Accounts/RecordsSection';
import {useCalendarDate} from '../../hooks/useCalendarDate';

const Accounts = () => {
  const {calendarDate, updateDate, updateMonth} = useCalendarDate()

  return (
    <>
      <CalendarSection accountsDate={calendarDate}
                       onClickMonth={updateMonth} onClickDate={updateDate}/>
      <RecordsSection accountsDate={calendarDate}/>
    </>
  );
};

export {Accounts};